<?php
/**
 * Organizations Template for Room Booking component
 */
defined('_JEXEC') or die('Restricted access');
?>
<form action="index.php" method="post" name="adminForm">
    <div id="editcell">
        <table class="adminlist">
            <thead>
                <tr>
                    <th width="20">
<?php echo JText::_('#'); ?>
                    </th>
                    <th width="20">
                        <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->items); ?>);" />
                    </th>
                    <th>
<?php echo JText::_('NAME'); ?>
                    </th>
                    <th width="100">
<?php echo JText::_('NUMSEATS'); ?>
                    </th>
                    <th width="100">
<?php echo JText::_('COST').'(VND)'; ?>
                    </th>
                    <th width="200">
<?php echo JText::_('CANCELCOST').'(VND)'; ?>
                    </th>
                    <th width="200">
<?php echo JText::_('手数料').'(VND)'; ?>
                    </th>
                    <th width="10">
<?php echo JText::_('ID'); ?>
                    </th>
                </tr>            
            </thead>
            <?php
            $k = 0;
            for ($i = 0, $n = count($this->items); $i < $n; $i++) {
                $row = & $this->items[$i];
                $checked = JHTML::_('grid.id', $i, $row->id);
                $link = 'index.php?option=com_roombooking&controller=type&task=edit&cid=' . $row->id;
                ?>
                <tr class="<?php echo "row$k"; ?>">
                    <td>
                        <?php echo $i + 1; ?>
                    </td>
                    <td>
                        <?php echo $checked; ?>
                    </td>

                    <td>
                        <a href="<?php echo $link; ?>"><?php echo $row->name; ?></a>
                    </td>
                    <td>
                        <?php echo $row->num_seats; ?>
                    </td>
                    <td>
                        <?php echo $row->cost; ?>
                    </td>
                    <td>
                        <?php echo $row->cancel_cost; ?>
                    </td>
                    <td>
                        <?php echo $row->fee; ?>
                    </td>
                    <td>
                        <?php echo $row->id; ?>
                    </td>
                </tr>
                <?php
                $k = 1 - $k;
            }
            ?>
        </table>
    </div>

    <input type="hidden" name="option" value="com_roombooking" />
    <input type="hidden" name="task" value="" />
    <input type="hidden" name="boxchecked" value="0" />
    <input type="hidden" name="controller" value="type" />

</form>
